package com.freejy.ecommunity.service;




import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.freejy.ecommunity.mapper.PlateMapper;
import com.freejy.ecommunity.model.Plate;

@Service
public class PlateService {

    private final Logger log = LoggerFactory.getLogger(PlateService.class);

    @Autowired
    private PlateMapper plateMapper;

    /**
     * 获取板块信息
     * @return
     */
    public List<Plate> getPlates(Integer size,Integer limit){
        return plateMapper.getPlates(size, limit);
    }


    /**
     * 根据板块id板块信息
     * @return
     */
    public List<Plate> getPlateByid(Integer plateId) {
        return plateMapper.getPlateByid(plateId);
    }
    /**
     * 新增帖子板块
     * @return
     */
    public  int insert(Plate plate){
        return plateMapper.insert(plate);
    }

    /**
     * 修改帖子板块
     * @return
     */
    public  int updateById(Plate plate){
        return plateMapper.updateById(plate);
    }

}
